<?php
	require_once(dirname(__FILE__)."/../config/include.php");
	
	sql_connect() ;
	
	//date_default_timezone_set('PRC');
	echo date("Y/m/d H:i:s",time()) ;
	
	create_logistics_for_trade("905620441469761398") ;
	
	exit(0) ;
	
	$img = new set_image() ;
	$img->createAndSave_Set(8) ;
	
	echo "call is over \r\n" ;
	
	exit(0) ;

	$a = "OezXcEiiBSKSxW0eoylIeITybpq6BgY_Ujm0pcxPmx6KCGbfDdAZ_pq2aTrPkkkOiZPuXc-mndqeONPsmY2cH9D2lmdmZrquTyWW4uYVuBY_LTtg5AEYBlMYQ_clHTwIBf7uEz-99eRrHFywh_dzXg" ;
	$o = "oFprWwYn4HiDZmhonFBZY2-smVPw" ;
	echo getWeiXinUserinfo($a , $o) ;
	
	exit(0) ;
	
	$ok = saveFile("d:/test.txt" , "kook") ;
	if ($ok)	echo "save is ok" ;
	else 		echo "save is fail" ;
	
	exit(0) ;
	
	
	function tt(&$a,&$b){
		$a = 10 ;
		$b = 20 ;
	}
	tt($t1) ;
	echo $t1 ,"," ; 
	exit(0) ;

	$filepath = "D:/wamp/www/furniture_test/images/chair/320_1.png" ;
	$savepath = "D:/wamp/www/furniture_test/images/chair/thumb/320_1.png" ;

	$rnt = getimagesize($filepath) ;
	print_r($rnt) ;

	$zoom = 0.5 ;
	//imagecreatefromgd()
	if ($rnt['mime'] == "image/png"){
		$src_image = imagecreatefrompng($filepath) ;
	}else if ($rnt['mime'] == "image/jpeg" || $rnt['mime'] == "image/jpg"){
		$src_image = imagecreatefromjpeg($filepath) ;
	}
	$dst_image = imagecreatetruecolor($rnt[0] * $zoom , $rnt[1] * $zoom) ;

	$dst_x = 0 ;
	$dst_y = 0 ;
	$src_x = 0 ;
	$src_y = 0 ;
	$dst_w = $rnt[0] * $zoom ;
	$dst_h = $rnt[1] * $zoom ;
	$src_w = $rnt[0] ;
	$src_h = $rnt[1] ;
	//imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) ;
	imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) ;
	imagejpeg($dst_image , $savepath , 100) ;
	

	
?>